package com.levi.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;

@Data
@Document("User") //表示集合的名称，即表名
public class User {

 @Id    //表示id，插入数据库后会自动生成一个24位的id
 private String id;
 private String name;
 private Integer age;
 private String email;
 private LocalDateTime createDate;
}